package com.fenghongzhang.day012;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import androidx.fragment.app.Fragment;

import org.greenrobot.eventbus.EventBus;


public class BlankFragment extends Fragment {
    private Button fgBtn;
    public BlankFragment() {
        // Required empty public constructor
    }
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View inflate = inflater.inflate(R.layout.fragment_blank, container, false);
        fgBtn = (Button) inflate.findViewById(R.id.fg_btn);

        fgBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //发送
                String s = "哈哈";
                EventBus.getDefault().post(s);
            }
        });
        return inflate;
    }
}
